import Vue from 'vue'
import Router from 'vue-router'

import Home from '@/views/Home'
import MovieTab from '@/views/movies/Tab'
import MovieSubject from '@/views/movies/Subject'
import MovieSearch from '@/views/movies/Search'
import About from '@/views/about/Index'
import Loading from '@/views/loading'
Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      redirect: '/movie/home', // 跳转
      name: 'Home',
      component: Home
    },
    {
      path: '/movie/home',
      name: 'MovieHome',
      component: MovieTab
    },{
      path: '/movie/subject/:id',
      name: 'MovieSubject',
      component: MovieSubject
    },
    {
      path: '/movie/search',
      name: 'MovieSearch',
      component: MovieSearch
    },{
      path: '/about',
      name: 'About',
      component: About
    },

    // 重定向
    {
      path: '/Vdo',
      redirect: '/movie/home'
    }

  ]
})
